/**
 * Created by luckyjing on 16/3/27.
 */
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;
var rentSchema = new Schema({
    tool: {
        type: Schema.ObjectId,
        ref: 'Tool'
    },
    user: {
        type: Schema.ObjectId,
        ref: 'User'
    },
    status: {
        type: Number
    },
    create_time: {
        type: Date,
        default: Date.now
    },
    num: {
        type: Number,
        required: true
    }
});
mongoose.model('Rent', rentSchema);